<?php
 
class bannerComponents extends sfComponents
{
  public function executeHome()
  {
    $q = Doctrine_Query::create()
      ->from('Banner b')
      ->where('b.publicado=1')
      ->orderBy('RAND()');
      //->orderBy('b.orden, b.updated_at');
    $this->banners = $q->execute();   
  }
}